Merged
Conversation
Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
Refactored test to utilize `stdio_client` for more accurate simulation of the fixed behavior and added handling for proper initialization with `ClientSession`. Increased timeout to 10 seconds to prevent premature failures and ensured hanging issue is properly caught and reported. Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
…ptions Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
Contributor
Author
|
The test |
…d exceptions Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
Updated the Windows-specific test to use `@pytest.mark.parametrize` for varied command arguments. This change improves test coverage and simplifies the testing of process creation scenarios. Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
2 tasks
felixweinberger
previously requested changes
Jul 1, 2025
Contributor
felixweinberger
left a comment
There was a problem hiding this comment.
Thank you @DanielAvdar for submitting this PR and helping us improve our test coverage!
I've left some comments on the PR - please address these and I'm happy to review quickly so we can get this landed.
- Replace asyncio.timeout with anyio.fail_after for consistency - Simplify exception handling - Uncomment Windows-specific test skip condition - Rewrite tests to focus on verifying no hang occurs (issue modelcontextprotocol#552) - Use simple Python subprocesses that exit quickly - Remove complex assertions - test passes if it completes without timeout
Dismissing review as I've applied fixes on tops of this branch - thanks @DanielAvdar for your contribution!
Contributor
|
Addressed comments + reformated the test to be a true regression test such that it would fail without the fix (previous format was causing xfail if not hanging which is counterintuitive). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a new test to verify the fix for a Windows-specific process creation issue described in issue #552. The test ensures that the process creation function works without hanging.
Added test for Windows process creation:
tests/issues/test_552_windows_hang.py: Introduced a new test,test_windows_process_creation, to validate the functionality of_create_platform_compatible_processon Windows. The test uses a simple command (cmd /c echo Test successful) and sets a timeout to prevent hanging. It verifies that the process is created successfully and produces output.